import 'package:flutter/material.dart';
import 'padding_page.dart';
import 'constrainedbox_sizedbox_page.dart';
import 'transform_page.dart';
import 'container_page.dart';
import 'scafford_page.dart';

class ContainerWidgetsPage extends StatefulWidget {
  @override
  _ContainerWidgetsPageState createState() => new _ContainerWidgetsPageState();
}

class _ContainerWidgetsPageState extends State<ContainerWidgetsPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Wrap(
          spacing: 4.0,
          runSpacing: 8.0,
          runAlignment: WrapAlignment.center,
          children: <Widget>[
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('Padding'),
              onPressed: () {
                Navigator.push(context,
                    new MaterialPageRoute(builder: (context) {
                  return new PaddingTestRoute();
                }));
              },
            ),
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('ConstrainedBox、SizedBox、DecoratedBox'),
              onPressed: () {
                Navigator.push(context,
                    new MaterialPageRoute(builder: (context) {
                  return new ConstrainedBoxAndSizedBoxTestRoute();
                }));
              },
            ),
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('Transform'),
              onPressed: () {
                Navigator.push(context,
                    new MaterialPageRoute(builder: (context) {
                  return new TransformTestRoute();
                }));
              },
            ),
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('Container'),
              onPressed: () {
                Navigator.push(context,
                    new MaterialPageRoute(builder: (context) {
                  return new ContainerTestRoute();
                }));
              },
            ),
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('Scaffold、TabBar、底部导航'),
              onPressed: () {
                Navigator.push(
                  context,
                  new MaterialPageRoute(
                    builder: (context) {
                      return new ScaffoldTestRoute();
                    },
                  ),
                );
              },
            )
          ],
        ),
      ),
    );
  }
}
